#!/usr/bin/python3

from ament_index_python import get_package_share_directory
from launch import LaunchDescription
from launch.substitutions import LaunchConfiguration
from launch.actions import DeclareLaunchArgument
from launch_ros.actions import LifecycleNode,Node

import lifecycle_msgs.msg
import os

def generate_launch_description():

    parameter_file = os.path.join(get_package_share_directory('hardware_controller'), 'config', 'base_controller_stm32.yaml')
                     
    base_controller_node = LifecycleNode(package='hardware_controller',
                                executable='base_controller_node',
                                name='base_controller_node',		#设置激光数据topic名称
                                output='screen',
                                emulate_tty=True,
                                namespace='',
                                parameters=[parameter_file],
                                )

    return LaunchDescription([
        base_controller_node,
    ])